package cn.dnui_xqh414.dnuifood_16110100414;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

public abstract class BaseActivity extends AppCompatActivity {

    protected int layout_file = R.layout.activity_login;
    abstract void initViews();
    abstract void initEvents();
    abstract void initData();

    public void setLayout_file(int layout_file) {
        setContentView(layout_file);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setLayout_file(layout_file);
        initViews();
        initEvents();
        initData();
    }
}
